package com.rmt.www.action;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.rmt.www.dao.ProjectDao;
import com.rmt.www.dao.UserDao;
import com.rmt.www.service.AdminManageUserService;
import com.rmt.www.vo.Project;
import com.rmt.www.vo.User;


public class DeleteUserAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private List<String> uids;
	private AdminManageUserService adminManageUserService;


	
	public AdminManageUserService getAdminManageUserService() {
		return adminManageUserService;
	}



	public void setAdminManageUserService(
			AdminManageUserService adminManageUserService) {
		this.adminManageUserService = adminManageUserService;
	}



	public List<String> getUids() {
		return uids;
	}



	public void setUids(List<String> uids) {
		this.uids = uids;
	}


	public static long getSerialversionuid() {
		return serialVersionUID;
	}



	public void deleteUser() {
		int id;
		String tmp;
		List<Integer> idList = new ArrayList<Integer>();
		for(int i=0;i<uids.size();i++){
			tmp=uids.get(i).trim();
		 	id=Integer.parseInt(tmp);
		 	idList.add(id);
		}
		adminManageUserService.deleteUsers(idList);
	}
}
